<%-- 
    Document   : add_warehouse
    Created on : 22.04.2013, 2:58:42
    Author     : Yasya
--%>

<%@page contentType="text/html" pageEncoding="UTF-8"%>
<!DOCTYPE html>
<html>
    <head>
        <script src="scripts/warehouseValidator.js"></script>
        <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
        <link rel="stylesheet" type="text/css" href="css/warehous_add.css">
         <link rel="stylesheet" type="text/css" href="css/all.css">
        <title>Add/Edit warehouse</title>
    </head>
    <body>      
        <header>
            <div id ="top_name"> 
                
                <a href="main.jsp"> <img src="/Delta-war/product/1.jpeg"></a>
                <h1> Add warehouse</h1> 
                       </div>
       
        </header>
        <div id="main">
            <div id="label1">
                <p>Name:<font color="red">*</font></p>
                <p>Address:<font color="red">*</font></p>
                  <p>Duration:<font color="red">*</font></p>
                <p>Shipment rate:<font color="red">*</font></p>
              

            </div>
            <div id="information">  
                <form method="Post" action="AddWarehouse" id="warehouse_form"> 
                    <p> <input type="text" id="Name" name="Name"  size="50" oninput="validateName()"/>
                        <span style="color: red;" id="name_error" > Name should not be empty</span>
                        <span id="name_length_error" style="color: red; display:none"> Name is too long</span>
                    </p>
                    <p> <input type="text" id="Address" name="Address" size="50" oninput="validateAddress()"/>
                        <span style="color: red;" id="address_error"> Address should not be empty</span>
                        <span id="address_length_error" style="color: red; display:none"> Address is too long</span>
                    </p>
                    <p> <input type="text" id="DurationKoefficient" name="DurationKoefficient" size="50" oninput="validateDurationKoefficient()"/>
                        <span style="color: red;" id="durationKoefficient_error"> Duration should not be empty</span>
                        <span id="durationKoefficient_number_error" style="color: red; display:none"> Duration  should be a number</span>
                    </p>
                    <p> <input type="text" id="ShipmentRate" name="ShipmentRate" size="50" oninput="validateShipmentRate()"/>
                        <span style="color: red;" id="shipmentRate_error"> Shipment rate should not be empty</span>
                        <span id="shipmentRate_number_error" style="color: red; display:none"> Shipment rate should be a number</span>
                    </p>
                                       
                </form>
                
            </div>
            
        
            <div id="line_button" style=" position: relative; bottom:  170px; left: 100px;">  <button id="ok" style="width: 80px;" onclick="submitForm()">Ok</button> <br></div>
                <div id="line_button"style=" position: relative; bottom: 170px; left: 100px; ">   <button id="ok" style="width: 80px;" onclick="window.location.href='ViewWarehouse' ">Cancel</button> </div>
        </div>
                <div id="footer">
                                <p>  &#169;All rights reserved</p>
                            </div>
    </body>
</html>
